using System;
using System.Collections.Generic;
using System.Text;

namespace TongJi_EMS._Event
{
    public class TJ_Delegate
    {
        public delegate void EditableChangedHandler(object sender, TJEventArgs e);
        public delegate void BolChangedHandler(TJBolChangeArgs e);
    }

    public class TJEventArgs : EventArgs
    {
        public TJEventArgs()
        { }
        public TJEventArgs(bool p_editable)
        {
            this._editable = p_editable;
        }

        private bool _editable = true;

        public bool Editable
        {
            get { return _editable; }
            set { _editable = value; }
        }
    }

    public class TJBolChangeArgs : EventArgs
    {
        public TJBolChangeArgs() { }
        public TJBolChangeArgs(string p_bol)
        {
            _bol = p_bol;
        }

        private string _bol = "";

        public string Bol
        {
            get { return _bol; }
            set { _bol = value; }
        }
    }

    public sealed class TJ_Notice
    {
        private TJ_Notice()
        {
        }
        public static readonly TJ_Notice Instance = new TJ_Notice();
        public event TJ_Delegate.EditableChangedHandler EditableChanged;
        public void SetMovable(object sender, bool p_movable)
        {
            EditableChanged(sender, new TJEventArgs(p_movable));
        }
    }
}
